
/**
 * How to write a text file (without error handling)
 * 
 * @author Amrita Mukherjee
 * @version 10/10/2012
 */
import java.io.*;
import java.util.*;

public class A13_1
{
    public static void main(String[] args) throws IOException
    {
        PrintWriter writer = new PrintWriter(new File("contacts.txt"));
        
        writer.println("Amrita Mukherjee");
        writer.println("(408 409 0848)");
        
        writer.println("Om Mandal");
        writer.println("(408 409 0812)");
        
        writer.println("Anaya Mandal");
        writer.println("(409) 445 8424");
        
        writer.close();
        
        System.out.println("File written.");
        
    }
}
/*
 * my test session:
 * File written.

 */